<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>


<head>
	
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>新增或修改用户</title>
	<style type="text/css">
		#addUserForm .row{
			margin-top: 5px;
		}
		
		.right{
			text-align: right;
		}
	</style>
	<script type="text/javascript">
		
	</script>
</head>

<body>
<input id="orgIds" type="hidden" value="${orgIds}"/>
<input id="resTreeIds" type="hidden" value="${resTreeIds}"/>

<div id="addmenuContent" style="position:absolute;display:none;"  >
	<ul id="addUserOrgTree" class="ztree" style="margin-top:0; width:160px;"></ul>
</div>
<form:form id="addUserForm" method="post" modelAttribute="addUser" cssClass="form-horizontal">
	<form:hidden path="userId"/>
	<form:hidden id="userOrgId" path="orgId"/>
	<span style="font-size:15px;">基本信息</span>
	<hr/>
	<div  class="row">
		<div class="span5">
			<div class="control-group ">
				<form:label cssClass="control-label" for="orgName" path="org.name" >所属组织:</form:label>
				<div class="controls">
					<form:input id="orgName" path="org.name" readonly="true"  onclick="addUserOrgTree();" class="input-small" check-type="required" required-message="所属组织不能为空!"/>
					<button type="button" class="btn" onclick="addUserOrgTree(); return false;">选择</button>
				</div>
			</div>
		</div>
		<div class="span4">
			<div class="control-group ">
				<form:label cssClass="control-label" for="userName" path="userName" >用户名称:</form:label>
				<div class="controls">
					<form:input id="userName" class="input-medium" path="userName" check-type="required" required-message="用户名不能为空!"/>
				</div>
			</div>
		</div>			
	</div>
			
	<div  class="row">
		<div class="span5">
			<div class="control-group ">
				<form:label cssClass="control-label" for="roleId" path="roleId" >所属角色:</form:label>
				<div class="controls">
					<form:input id="roleId" path="roleId" readonly="true"  class="input-small" />	
					<button type="button" class="btn" onclick="addUserRoleTree(); return false;">选择</button>	
				</div>
			</div>
		</div>
		<div class="span4">
			<div class="control-group ">
				<form:label cssClass="control-label" for="loginName" path="loginName" >登陆账号:</form:label>
				<div class="controls">
					<form:input id="loginName" path="loginName" class="input-medium" check-type="required" required-message="登陆账号不能为空!"/>
				</div>
			</div>
		</div>
	</div>	
	
	<div  class="row" id="passwords">
		<div class="span5">
			<div class="control-group ">
				<form:label cssClass="control-label" for="password" path="password" >登陆密码:</form:label>
				<div class="controls">
					<form:input id="password" path="password" class="input-medium" type="password" placeholder="留空使用默认密码" check-type="checkPassword"/>
				</div>
			</div>
		</div>
		
		<div class="span4">
			<div class="control-group ">
				<form:label cssClass="control-label" for="confirm" path="confirm" >确认密码:</form:label>
				<div class="controls">
					<form:input id="confirm" path="confirm" class="input-medium" type="password" check-type="checkConfirm" />
				</div>
			</div>
		</div>
	</div>	

	<div  class="row">
		<div class="span5">
			<div class="control-group ">
				<form:label cssClass="control-label" for="mobilePhone" path="mobilePhone" >手机号码:</form:label>
				<div class="controls">
					<form:input id="mobilePhone" path="mobilePhone" class="input-medium" check-type="mobilePhone"/>
				</div>
			</div>
		</div>
		
		<div class="span4">
			<div class="control-group ">
				<form:label cssClass="control-label" for="officePhone" path="officePhone" >办公电话:</form:label>
				<div class="controls">
					<form:input id="officePhone" path="officePhone" class="input-medium" check-type="officePhone"/>
				</div>
			</div>
		</div>	
	</div>	
	
	<div  class="row">
		<div class="span5">
			<div class="control-group ">
				<form:label cssClass="control-label" for="email" path="email" >电子邮箱:</form:label>
				<div class="controls">
					<form:input id="email" path="email" class="input-medium" check-type="required mail" required-message="电子邮箱不能为空!" mail-message="E-MAIL格式有误"/>
				</div>
			</div>
		</div>
		<div class="span4">
			<div class="control-group ">
				<form:label cssClass="control-label" for="remark" path="remark" >备注信息:</form:label>
				<div class="controls">
					<form:textarea id="remark" path="remark" class="input-medium" rows="3" />
				</div>
			</div>
		</div>	
	</div>	
	<br/><br/>
	<span style="font-size:15px;">数据权限</span>
	<hr/>
	<div  class="row">
		<div class="span5">
				<div class="control-group ">
					<form:label cssClass="control-label" for="" path="" >组织授权</form:label>
					<div class="controls">
						<div id="impowerOrgContent" style="position:obsolute;"  >
							<ul id="impowerOrgTree" class="ztree" style="margin-top:0; width:160px;"></ul>
						</div>
					</div>
				</div>
		</div>	
		<div class="span4">
				<div class="control-group ">
					<form:label cssClass="control-label" for="" path="" >资源授权</form:label>
					<div class="controls">
						<div id="impowerResContent" style="position:obsolute;"  >
							<ul id="impowerResTree" class="ztree" style="margin-top:0; width:160px;"></ul>
						</div>
					</div>
				</div>
		</div>			
	</div>
	

	<div class="alert" style="visibility: hidden;width: 55px;margin-left: 30%;"/>
	
</form:form>

</body>
</html>